package cn.cvs.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.context.annotation.Scope;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 角色类
 * @author project.cvs.team
 */
@Scope("prototype")
@Component
public class SysRole {

	private Integer id;   			//id
	private String code;			//角色编码
	private String roleName; 		//角色名称
	private Integer createdUserId;	//创建者
    @JSONField(format = "yyyy-MM-dd")//后台->客户端后台数据
    @DateTimeFormat(pattern = "yyyy-MM-dd")//客户端->后台
	private Date createdTime; 		//创建时间
	private Integer updatedUserId;	//更新者
    @JSONField(format = "yyyy-MM-dd")//后台->客户端后台数据
    @DateTimeFormat(pattern = "yyyy-MM-dd")//客户端->后台
	private Date updatedTime;		//更新时间
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getRoleName() {
		return roleName;
	}
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}
	public Integer getCreatedUserId() {
		return createdUserId;
	}
	public void setCreatedUserId(Integer createdUserId) {
		this.createdUserId = createdUserId;
	}
	public Date getCreatedTime() {
		return createdTime;
	}
	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}
	public Integer getUpdatedUserId() {
		return updatedUserId;
	}
	public void setUpdatedUserId(Integer updatedUserId) {
		this.updatedUserId = updatedUserId;
	}
	public Date getUpdatedTime() {
		return updatedTime;
	}
	public void setUpdatedTime(Date updatedTime) {
		this.updatedTime = updatedTime;
	}


	@Override
	public String toString() {
		return "SysRole{" +
				"id=" + id +
				", code='" + code + '\'' +
				", roleName='" + roleName + '\'' +
				", createdUserId=" + createdUserId +
				", createdTime=" + createdTime +
				", updatedUserId=" + updatedUserId +
				", updatedTime=" + updatedTime +
				'}';
	}
}
